package com.example.springspel.controller;

import com.example.springspel.annotation.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class ApiController {

  @PreAuthorize("api.save")
  @GetMapping("/save")
  public Object save() {
    return "save" ;
  }

  @PreAuthorize("api.update")
  @GetMapping("/update")
  public Object update() {
    return "update" ;
  }
}